/*
 * @Author: error: git config user.name & please set dead value or install git
 * @Date: 2023-11-27 13:52:24
 * @LastEditors: error: git config user.name & please set dead value or install git
 * @LastEditTime: 2023-12-18 10:27:43
 * @FilePath: \haixiaoke-enterprise-reconstruction\src\api\contract\add.js
 * @Description:
 */
import request from "@/utils/request";
// 查询全部收费项目
export function getChargeItemList() {
  return request({
    url: "/enterprise/house/houseChargeItem/allInfo",
    method: "get",
  });
}

// 获取所有房屋信息
export function getHouseAll() {
  return request({
    url: "/enterprise/house/house/all",
    method: "get",
  });
}

// 获取所有合同模板
export function getContractTemplateAll() {
  return request({
    url: "/enterprise/contract/contractTemplate/all",
    method: "get",
  });
}

// 查询合同列表
export function listContract(params) {
  return request({
    url: "/enterprise/contract/contract/list",
    method: "get",
    params
  });
}

// 新增合同
export function addContract(data) {
  return request({
    url: "/enterprise/contract/contract",
    method: "post",
    data,
  });
}

//统计合同所有状态的数量
export function getCountContractState(){
    return request({
        url:'/enterprise/contract/contract/countContractState',
        method:'get',
    })
}

//查询合同详情
export function getContract(id){
    return request({
        url:'/enterprise/contract/contract/'+id,
        method:'get',
    })
}

//根据房屋id查询房屋配置
export function getHouseItemById(id){
    return request({
        url:'/enterprise/house/item/info/'+id,
        method:'get',
    })
}
